ETH2.0: Phase 2
Resources
See also
History
A Journey Through Phase 2 of Ethereum 2.0 Medium, 2019.5 Vitalik Phase 2 Design Spaces Video @Scailing Ethereum 2019, 2019.6 Similar Slide @ETHNewYork, 2019.5 Execution Environment Design
Background
Introduction of "execution script (environment)"
The basic idea: contracts as a base-layer concept exist only on the beacon chain, and ETH only exists on the beacon chain ETH can be held by either beacon chain contracts (also called “precompiles”) or by validator accounts)
However, shards continue to have their own execution and their own state.
A transaction on a shard must specify which precompile it calls, and the in-shard state transition function executes the specific beacon chain precompile code using the transaction as data, with the code execution having the ability to read and write from a region of the state of any shard reserved for that precompile and issue receipts.
Iterations
There is no longer any notion of shard state; instead, a shard block only contains a blob of data, a reference to a on-beacon-chain pure function ID, and a reduction output.
The beacon chain now contains a full stateful state transition engine à la eth1.
Every shard has a state, which is a mapping ExecEnvID -> (state_hash, balance).
A shard block is split into a set of chunks, where each chunk specifies an execution environment.
The execution of a chunk takes as input the state root and the contents of the chunk (ie. a portion of the shard block data) and outputs a list of [shard, EE_id, value, msg_hash] tuples, maximum one EE_id per shard
In the shard block header, we put a “receipt root”, which contains a mapping shard -> [[EE_id, value, msg_hash]...]
Main benefit: easier fee markets
Cross-shard ETH transfers
Problem Definition
Solution: Replace the tree of consumed receipt IDs with the nonce of send/receive receipts by enforcing receipts to be processed sequentially
Will's comment on a "receipt bitfields" idea EE-based
Stateless client
Fee Market
State Provider
Static State Access
Others
Simulation
ETH1 EE